<template>
  <view class="my-title">
    <view class="icon" @click="toBack">
      <uni-icons type="back" :color="color" size="30"></uni-icons>
    </view>  
    <view class="title">  
      <text :color="color">{{title}}</text> 
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-title",
    props:{
      title: {
        type: String,
        default:''
      },
      color: {
        type: String,
        default:'black'
      }
    },
    data() {
      return {
        
      };
    },
    methods: {
      toBack(){
        this.$emit('myBack')
      }
    }
  }
</script>

<style lang="scss">
.my-title {
  height: 70px;
  display: flex;
  position: relative;
  // text-align: center;
  justify-content: center;
  // align-items: center;
  .icon {
    position: absolute;
    left: 15px;
    bottom: 10px;
  }
  .title {
    font-size: 20px;
    font-weight: bold;
    position: absolute;
    // left: 15px;
    bottom: 10px;
  }
}
</style>